package com.cal.utms.action.maintenance;

import com.cal.utms.dto.maintenance.IssuerContactPersonDto;
import com.cal.utms.model.maintenance.IssuerModel;
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;

public class IssuerContactPersonAction extends ActionSupport implements ModelDriven<IssuerContactPersonDto> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 5003395797576624324L;

	IssuerModel issuerModel = new IssuerModel();
	private IssuerContactPersonDto contactPersonDto = new IssuerContactPersonDto();
	private int issuer_id;

	public String getConPersonByIssuer() {
		contactPersonDto.setContactPersonDtos(issuerModel.getContactsByIssuer(issuer_id));
		return Action.SUCCESS;
	}

	public IssuerContactPersonDto getContactPersonDto() {
		return contactPersonDto;
	}

	public void setContactPersonDto(IssuerContactPersonDto contactPersonDto) {
		this.contactPersonDto = contactPersonDto;
	}

	@Override
	public IssuerContactPersonDto getModel() {
		return contactPersonDto;
	}

	public int getIssuer_id() {
		return issuer_id;
	}

	public void setIssuer_id(int issuer_id) {
		this.issuer_id = issuer_id;
	}

}
